

function urlParamsParse() {
    //  var search = "?user=a123123&pwd=123123&phone=17386141517&email=123123@qq.com";

    var data = {};
    var search = location.search;
    if (search) {
        // var reg = /(\w+)=([^&]+)/;
        // console.log(reg.exec(search), RegExp.$1, RegExp.$2);
        var reg = /(\w+)=([^&]+)/ig;
        while (reg.exec(search)) {
            console.log(RegExp.$1, RegExp.$2);
            data[RegExp.$1] = decodeURIComponent(RegExp.$2);
        }
    }
    // console.log(data);

    return data;
}